/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package trefliq.EJB.webservice;

import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.jws.Oneway;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import trefliq.EJB.entities.ShowBizPeople;
import trefliq.EJB.sessionbeans.ShowBizPeopleSession;

/**
 *
 * @author eric
 */
//@WebService(serviceName = "ShowBizPeopleWebService")
@Stateless()
public class ShowBizPeopleWebService {
    @EJB
    private ShowBizPeopleSession ejbRef;// Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Web Service Operation")

    @WebMethod(operationName = "getAllShowBizPeople")
    public List<ShowBizPeople> getAllShowBizPeople() {
        return ejbRef.getAllShowBizPeople();
    }

    @WebMethod(operationName = "findShowBizPersonById")
    public ShowBizPeople findShowBizPersonById(@WebParam(name = "personId") Long personId) {
        return ejbRef.findShowBizPersonById(personId);
    }

    @WebMethod(operationName = "findShowBizPersonByLastName")
    public ShowBizPeople findShowBizPersonByLastName(@WebParam(name = "lname") String lname) {
        return ejbRef.findShowBizPersonByLastName(lname);
    }

    @WebMethod(operationName = "findShowBizPersonByFirstName")
    public ShowBizPeople findShowBizPersonByFirstName(@WebParam(name = "fname") String fname) {
        return ejbRef.findShowBizPersonByFirstName(fname);
    }

    @WebMethod(operationName = "findShowBizPersonByName")
    public ShowBizPeople findShowBizPersonByName(@WebParam(name = "fname") String fname, @WebParam(name = "lname") String lname) {
        return ejbRef.findShowBizPersonByName(fname, lname);
    }

    @WebMethod(operationName = "createShowBizPerson")
    public ShowBizPeople createShowBizPerson(@WebParam(name = "person") ShowBizPeople person) {
        return ejbRef.createShowBizPerson(person);
    }

    @WebMethod(operationName = "deleteShowBizPerson")
    public ShowBizPeople deleteShowBizPerson(@WebParam(name = "person") ShowBizPeople person) {
        return ejbRef.deleteShowBizPerson(person);
    }

    @WebMethod(operationName = "editShowBizPerson")
    public ShowBizPeople editShowBizPerson(@WebParam(name = "person") ShowBizPeople person) {
        return ejbRef.editShowBizPerson(person);
    }
    
    @WebMethod(operationName = "deleteAll")
    @Oneway
    public void deleteAll() {
        ejbRef.deleteAll();
    }
}
